package org.frog.sgs.server.msg;

import java.io.IOException;

import org.frog.sgs.character.Character;
import org.frog.sgs.event.SgsEventCode;
import org.frog.sgs.io.SgsMsg;

/**
 * @author duanxiangqi
 * @date 2012-10-26
 */
public class ServerMsgChooseRole extends SgsMsg {

	private static final long serialVersionUID = -3194850296731511971L;

	public ServerMsgChooseRole(Character character) {
		super(SgsEventCode.CHOOSE_ROLE);
		try {
			writeInt(character.getRole().getId());
			writeInt(character.getPosition());
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
